// 导入vue插件
import Vue from "vue";

// 导入vue-router路由
import VueRouter from 'vue-router'


// 导入所有组件
// import tiyu from "@/components/tiyu.vue"
// import yule from "@/components/yule.vue"
// import shenhuo from "@/components/shenhuo.vue"

// 要显示安装到Vue的身上
Vue.use(VueRouter);

// 创建路由对象，设置路由表信息
const router = new VueRouter({
    routes: [{
            path: "/tiyu",
            component: () => import("@/components/tiyu")
        },
        {
            path: "/yule",
            // component: yule  原写法
            // 路由懒加载
            component: () => import("@/components/yule")
        },
        {
            path: "/shenhuo",
            component: () => import("@/components/shenhuo")
        },
       
    ]
})

export default router;